package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLScreen;

public class HLClassScreen extends HLLibClass {
    public HLClassScreen(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLScreen();
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HLScreen.Width();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLScreen.Width());
            }
            break;
        }
        case 1: {
            if (resultOwnerObject == null) {
                HLScreen.Height();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLScreen.Height());
            }
            break;
        }
        case 2: {
            HLScreen.SetOrientationEnable(args.GetInt(0));
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                HLScreen.IsSupportOrientation(args.GetInt(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, HLScreen.IsSupportOrientation(args.GetInt(0)));
            }
            break;
        }
        case 4: {
            HLScreen.SetCurOrientation(args.GetInt(0));
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                HLScreen.GetCurOrientation();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLScreen.GetCurOrientation());
            }
            break;
        }
        }
    }
}
